﻿/**
*贷款奖励
*/
Chenxin.UI.LoanEncouragementForm = Chenxin.extend(Chenxin.UI.FormCommon,{
    actionUrl:'/service/logic/ShowListLoan.ashx',
    id:'LoanEncouragement',
    renderTo:'divLoanEncouragement',
    winCls:'',
    jqmWidth:650,
    defBBtn:true,
    createForm: function() {
        return Chenxin.FormCommon.LoanEncouragementForm(this.id);
    },
    initEvent: function() {
        var _this = this;
        var thisid='#'+this.id;	
		_this.isclick = true;
		
		$(thisid+'_save').live('click',function(){			
		    if(_this.isclick)
		    {
			    _this.save();
			}
		});
		$(thisid+'_cancle').live('click',function(){			
			_this.hide();
		});
		$("input[name='TJMoney']").keydown(function (event) {
            if (((event.keyCode > 47) && (event.keyCode < 58)) || 
                  ((event.keyCode > 95) && (event.keyCode < 106)) ||
                  (event.keyCode == 110) || (event.keyCode == 8) ||   
                  (event.keyCode == 190)) {
                return true;      
            } else {      
                return false;      
            }      
        });
        $("input[name='TJPercent']").keydown(function (event) {
            if (((event.keyCode > 47) && (event.keyCode < 58)) || 
                  ((event.keyCode > 95) && (event.keyCode < 106)) ||
                  (event.keyCode == 110) || (event.keyCode == 8) ||   
                  (event.keyCode == 190)) {
                return true;      
            } else {      
                return false;      
            }      
        });
    },
    saveSucc: function() {
        this.reloadGrid();
    },
    initComponent: function() {
        Chenxin.UI.LoanEncouragementForm.superclass.initComponent.call(this);
    }
});

Chenxin.FormCommon.LoanEncouragementForm=function(formID){
	return '<table class="tbl_f"><tr><th style="width:100px; height:26px;">成交编号：</th><td><input name="ContractCode" class="inputbox_n fl" type="text" readonly="readonly" style="width:71px;"/></td><th>房源地址：</th><td><input name="Address" class="inputbox_n fl" type="text" readonly="readonly" style="width:160px;"/></td></tr><tr><th>主贷人：</th><td><input name="CustomerName" class="inputbox_n fl" type="text" readonly="readonly" style="width:71px;"/></td><th>商业贷款金额：</th><td><input name="SYMoney" class="inputbox_n fl" type="text" readonly="readonly" style="width:71px;"/></td></tr><tr><th>团奖金额：</th><td><input name="TJMoney" class="inputbox_n fl" type="text" style="width:71px;ime-mode:disabled;"/></td><th>贷款反奖比例：</th><td><input name="TJPercent" class="inputbox_n fl" type="text" style="width:71px;ime-mode:disabled;"/>%</td></tr><tr><th>发奖日期：</th><td><input style="width:71px;" name="TJDate" class="inputbox_n fl" id="ReceiveLoanDate" type="text" onclick="WdatePicker({position:{left:this.getBoundingClientRect().left+1,top:this.getBoundingClientRect().top+22}});" readonly="readonly" /></td></tr><tr><td colspan="2" ><input type="hidden"  name="RecordId" /></td></tr></table>';
};